<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="url = 'http://www.zllhyy.cn' ">切换地址</button>
        <!-- 把href的属性值绑定到url -->
        <!-- 也就是说url是什么，那么href的值就是什么 -->
        <a v-bind:href="url" v-bind:target="tg">点我去百度</a>

        <!-- 简写形式:就是把v-bind去掉，留冒号即可 -->
        <a :href="url" :target="tg">点我去百度</a>

    </div>

    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                url: 'http://www.baidu.com',
                tg: '_blank'
            }
        })
    </script>
</body>
</html>